<h2>Add Prerequisites for <%= @task.name %> </h2>
<%= render :partial => "tasks/task_info" %>
<% if @potentials.blank? -%>
<p>No tasks available to be added.</p>
<% else -%>

<table>
  <tr>
    <th>Task</th>
    <th>Description</th>
    <th>Add Prerequisite</th>
  </tr>

<% @potentials.each do |potential| %>
  <tr>
    <td><%= link_to potential.name, project_task_path(potential.project,potential) %></td>
    <td><%=h potential.desc %></td>
    <td><%= link_to 'Add Prerequisite', dependencies_path(:task_id => @task, :prerequisite_id => potential), :method => :post, :title => "Add #{potential.name} as prerequisite" %></td>
  </tr>
<% end %>
</table>

<% end -%>

<br />

<%= link_to 'Back', project_task_path(@task.project,@task) %>
